<template>
    <div>
        <el-card class="box-card">
            <h4>登录</h4>
                <p><el-input v-model="user.username" placeholder="请输入用户名"/></p>
                <p><el-input v-model="user.pwd" placeholder="请输入密码"type="password"/></p>
                <p><el-button type="primary" @click="userLogin()">登录</el-button></p>

        </el-card>
    </div>
</template>

<script>
    export default {
        name: "Login",
        data: function () {
            return {
                user: {
                    username: '',
                    pwd: ''
                }
            }
        },
        methods: {
            userLogin() {
                    console.log(this.$api.login.RoleList)
                    this.$router.push('home')
            }
        }
    }
</script>

<style scoped>
    .box-card {
        width: 480px;
        height: 350px;
        margin:  auto;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;

    }
    .box-card p{
        margin-top: 20px;
    }
    .box-card h4{
        margin-top:30px;
    }
</style>